Splines
Regression
Adaptive
Multivariate
Splines
They are flexible lines/curves that are combined together
Individual splines components are generally relevant to only part of the space/range of a feature or a set of features
They have continuity constraints (joined together - no jumps), and smoothness constraints (e.g. up to second derivative continuity at a join)
Regression
library(tidyverse) require(ISLR) ?Wage #for more details on the dataset # Exclude very high salaries Wage <- Wage %>% filter(wage < 250) p <- ggplot(Wage, aes(x=age,y=wage)) + geom_point(colour='blue') p
Adaptive
Multivariate
Splines can be fit with the same machinery as multivariate linear models, these use a ‘design’ or ‘model’ matrix
Each column of your model matrix corresponds to a basis function, more on this later
Interactions are modelled using tensor product. This is equivalent to including a column with element-wise multiplication of other columns (same as in standard multivariate linear regression)